<template>
    <div>
      <!-- 面包屑 -->
      <el-bread></el-bread>
      <!-- 添加按钮 -->
      <el-button @click="addlog" class="btnInfo" type="primary" size="small" plain>添加</el-button>
      <h2>角色管理拉拉啊</h2>
      <v-list  @edit="edit"></v-list>
      
      <v-dialog ref="dialogRef" :Info="Info" @del="del"></v-dialog>

    </div>
  </template>
  
  <script>
 import vDialog from './dialog.vue'
import vList from './list.vue'
 
  export default {
    data() {
      return {
        Info:{
          isShow:false, //打开弹框
          isAdd:true //是否添加
        }
      };
    },
    components:{
      vList,
      vDialog
    },
    methods:{
      addlog(){
        //打开弹框
        this.Info.isShow = true
        this.Info.isAdd = true
      },
      del(e){
        this.Info.isShow =e
      },
      //编辑
      edit(e){
        this.Info.isShow = true
        this.Info.isAdd = false
        this.$refs.dialogRef.lookup(e)
    }
    }
  };
  </script>
  
  <style lang="less" scoped>
  .btnInfo {
    margin: 10px 5px;
  }
  </style>
  